Configuring AWS SES Service
This section describes how to configure the OVOC server as the Email server on Amazon AWS. These steps are necessary in to overcome Amazon security restrictions for sending emails outside of the AWS domain.
If AWS Simple Email Service (SES) runs in Sandbox mode, both sender and recipient addresses should be verified (see https://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html)
| ➢ | To configure OVOC as email server on AWS SES: |
| 1. | Login to the OVOC server with root permissions. |
| 2. | Open file /root/.muttrc: |
Copy
cat .muttrc
| 3. | Replace "OVOC@AudioCodes.com" with authenticated source email. |
| 4. | Open file /etc/exim/exim.conf and using a text editor, find the respective "begin …" statements and paste the below configuration accordingly |
| ● | Replace : AWS_SES_LOGIN : AWS_SES_PASSWORD with the credentials received from AWS |
| ● | Replace : SOURCE_EMAIL with an authenticated source email address |
| ● | Replace: HOSTNAME with the VM hostname |
Copy
===================================================
begin routers
send_via_ses:
driver = manualroute
domains = ! +local_domains
transport = ses_smtp
route_list = * email-smtp.eu-central-1.amazonaws.com;
===================================================
begin transports
ses_smtp:
driver = smtp
port = 587
hosts_require_auth = *
hosts_require_tls = *
===================================================
begin authenticators
ses_login:
driver = plaintext
public_name = LOGIN
client_send = : AWS_SES_LOGIN : AWS_SES_PASSWORD
===================================================
begin rewrite
^root@HOSTNAME SOURCE_EMAIL SFfrs
===================================================
| 5. | Remove old unsent emails from buffer and restart exim service: |
Copy
systemctl restart exim
exim -bp | exiqgrep -i | xargs exim -Mrm
rm -rf /var/spool/exim/db/*
| 6. | Send test email using mutt: |
Copy
echo "Hello!" > ~/message.txt
mutt -s "Test Mail from OVOC" -F /root/.muttrc EMAIL_ADDRESS < ~/message.txt
| 7. | Verify in the exim log in /var/log/exim/main.log to check that the email was sent correctly. |